﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NeedMaterialListForPurchaseOrderHeader.aspx.cs" Inherits="weba.Sales.NeedMaterialListForPurchaseOrderHeader" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script type="text/javascript" >
        function OpenModalDialog(url) {
            var newWin = null;
            newWin = window.showModalDialog(url, window, 'dialogHeight:600px;dialogWidth:800px');
            if (newWin == null) {
                return;
            }
            newWin.open();
        }
   </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" background="../Images/tab_05.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="30">
                                <img src="../Images/tab_03.gif" width="12" height="30" />
                            </td>
                            <td>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="46%" valign="middle">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="16" height="16" /></div>
                                                    </td>
                                                    <td width="95%">
                                                        <span class="titleBold12px">待订货用料单列表</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td width="54%" align="right">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="16" height="30">
                                <img src="../Images/tab_07.gif" width="16" height="30" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="8" background="../images/tab_12.gif">
                                &nbsp;
                            </td>
                            <td align="center">
                                <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                                    <ProgressTemplate>
                                        <img src="../Images/ajax-loader.gif" alt="" />数据载入中，请稍候...
                                    </ProgressTemplate>
                                </asp:UpdateProgress>
                                <br />
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td align="center">
                                                    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td align="left">
                                                                说明：不能修改已经到货完成付款流程的订单。
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="right">
                                                                <asp:Label ID="lblStrWhere" runat="server" Visible="False"></asp:Label>
                                                                <asp:Label ID="lblRootDepartmentID" runat="server" Visible="False"></asp:Label>
                                                                <br />
                                                                订单编号：<asp:TextBox ID="txtSalesOrderNumber" runat="server"></asp:TextBox>
                                                                客户名称：<asp:TextBox ID="txtCustomerName" runat="server"></asp:TextBox>
                                                                <br />
                                                                电话：<asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                                                                手机：<asp:TextBox ID="txtCellPhone" runat="server"></asp:TextBox>
                                                                地址：<asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
                                                                <br />
                                                                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" />
                                                                分页页数：<asp:TextBox ID="txtPageSize" runat="server" Width="50px"></asp:TextBox>
                                                              
                                                                </AjaxControlToolkit:FilteredTextBoxExtender>
                                                                <asp:Button ID="btnSetPageSize" runat="server" Text="确定" OnClick="btnSetPageSize_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td width="80%">
                                                              
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" Width="98%"
                                                        DataKeyNames="NeedMaterialID,SalesOrderID" OnRowDataBound="myGridView_RowDataBound">
                                                        <Columns>
                                                            <asp:TemplateField Visible="False">
                                                                <HeaderTemplate>
                                                                    <input onclick="checkFormAll(this.checked)" type="checkbox">
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkSelect" runat="server"></asp:CheckBox>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="20px" />
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="NeedMaterialID" HeaderText="ID" ReadOnly="True">
                                                                <ItemStyle Width="50px" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField HeaderText="订单编号">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblSalesOrderNumber" runat="server" ></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="客户名称">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCustomerName" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="DateOrder" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False"
                                                                HeaderText="用料单日期" />
                                                            <asp:TemplateField HeaderText="设计师">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDesigner" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="提交状态">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblStatusSubmit" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            
                                                            <asp:TemplateField HeaderText="订货状态">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblStatusPurchaseMaterial" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            
                                                              <asp:TemplateField HeaderText="订单详情">
                                                                <ItemTemplate>
                                                                    <a href="javascript:void(0)" onclick="OpenModalDialog('SalesOrderShow.aspx?SalesOrderID=<%# Eval("SalesOrderID") %>');">
                                                                        查看</a>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="60px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="用料单明细">
                                                                <ItemTemplate>
                                                                    <a href="javascript:void(0)" onclick="OpenModalDialog('NeedMaterialDetailShow.aspx?NeedMaterialID=<%# Eval("NeedMaterialID") %>');">
                                                                        查看</a>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="70px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="订货单管理">
                                                                <ItemTemplate>
                                                                    <asp:HyperLink ID="linkPurchaseOrderEdit" runat="server">[linkPurchaseOrderEdit]</asp:HyperLink>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                            <td width="8" background="../images/tab_15.gif">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td height="35" background="../images/tab_19.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="35">
                                <img src="../images/tab_18.gif" width="12" height="35" />
                            </td>
                            <td align="center">
                                &nbsp;
                            </td>
                            <td width="16">
                                <img src="../images/tab_20.gif" width="16" height="35" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
